#include "../inc/mzrtos.h"

static struct mz_thread idle_thread;
static mz_uint8_t idle_thread_stack[MZ_IDLE_THREAD_STACK_SIZE];
static mz_uint32_t mz_idle_tick = 0;

static void _mz_idle_thread_entry(void* arg){
    for(;;){
        mz_idle_tick ++;
    }
}

void mz_idle_init(void){
    mz_thread_init(&idle_thread,
                   "idle",
                   _mz_idle_thread_entry,
                   MZ_NULL,
                   idle_thread_stack,
                   MZ_IDLE_THREAD_STACK_SIZE,
                   MZ_THREAD_PRIORITY_MAX - 1,
                   10);
}